<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%> 
<html>
<body class="easyui-layout list_body">
	<form id="smsCodeLogForm" name="smsCodeLogForm" >
		<div class="list_body_north" data-options="region:'north'" border="false">
		 	<!-- 查询表单 -->
		 	<div  class="datagrid-toolbar" border="false"  >
					<span>所属机构:</span>
					<select id="ins_uuid" name="ins_uuid" class="easyui-combobox" style="width:240px;" data-options="editable:false"  >
					    <option value="">--请选择机构--</option>
					    <c:if test="${appInses != null}">
					    	<c:forEach items="${appInses}" var="appIns">
							    <option value="${appIns.INS_UUID}">${appIns.INS_NAME}</option>
					    	</c:forEach>
					    </c:if>
					</select>
					<span>发送起始日期:</span>
					<input type="text" id="send_dt" name="send_dt" class="easyui-datebox" data-options="editable:false"  />
					<span>发送结束日期:</span>
					<input type="text" id="send_ts" name="send_ts" class="easyui-datebox" data-options="editable:false"  /><br/>
					<span>状态:</span>
					<code:codeSelect name="rand_st" id="rand_st" code_type="RAND_ST" showSelect="true"></code:codeSelect>
					<span>接受方电话号码:</span>
					<input id="phone" type="text" name="phone" class="easyui-textbox"/>
						<span>业务类型:</span>
					<code:codeSelect name="service_type" id="service_type" code_type="RAND_TYPE" showSelect="true"></code:codeSelect>			
				 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a>
				 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>
			</div>
			<!-- 自定义标签工具栏 -->
			<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>
		</div>
		<div data-options="region:'center'" border="false" class="list_body_center">
			<!-- 表格 -->
		    <table id="smsCodeLogTableId" fit="true"></table>
	    </div>
	</form>
	<script type="text/javascript">
		var grid;
		$(function(){
			grid = $("#smsCodeLogTableId").jpgrid({
				url: "getSmsCodeFlowListJson.do",
	        	baseColumns: false,
				columns: [
					{title: "发送时间", field: "SEND_TIME",width: 130},
					{title: "接受方电话号码", field: "PHONE",width: 120},
					{title: "验证码", field: "RAND",width: 80},
					{title: "业务类型", field: "SERVICE_TYPE",width: 140},
					{title: "所属机构", field: "INS_NAME",width: 230},
					{title: "状态", field: "RAND_ST",width: 80},
					{title: "响应消息", field: "RSP_CD",width: 200}
				]
			});	 
		});
		/*查询*/
		function doSearch() {
			grid.load({
				send_dt: $('#send_dt').val(),
				send_ts: $('#send_ts').val(),
				rand_st: $('#rand_st').val(),
				phone: $('#phone').val(),
				service_type: $('#service_type').val(),
				ins_uuid: $("#ins_uuid").val()
			});
		}
		/*导出文件*/
		function exportFile(url){
			commonFileDownload(url, "smsCodeLogForm");
		}
	</script>
</body>
</html>
